package nuts.context;

import nuts.context.meta.NutsHome;
import nuts.exception.NutsHomeDestroyException;
import nuts.exception.NutsHomeInitializeException;
import nuts.exception.NutsNotFoundException;
import nuts.exception.NutsRegisterException;

public class GenericNutsFactory implements NutsFactory {

	private NutsHome nutsHome;
	
	@Override
	public void init(ResourceLoader resource)
			throws NutsHomeInitializeException {
		try {
			nutsHome=resource.load();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public void destroy() throws NutsHomeDestroyException {
		nutsHome=null;

	}

	@Override
	public <T> T getNut(String name, T type) throws NutsNotFoundException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public <T> void refreshNut(String name, T type)
			throws NutsRegisterException {
		// TODO Auto-generated method stub

	}

}
